package org.softee.extractor.sax.helper;

import static org.junit.Assert.*;
import static org.softee.extractor.sax.helper.XmlEscaper.*;

import org.junit.Test;

public class XmlEscaperTestEscaper {

    @Test
    public void testEscape() {
        assertSame("", escapeText(""));
        assertSame("Hello\"world", escapeText("Hello\"world"));
        assertEquals("&lt;hello&gt;", escapeText("<hello>"));
        assertEquals("hello&amp;world", escapeText("hello&world"));
        assertEquals("\"hello&quot;world\"", quotedAttributeText("hello\"world"));
    }

}
